home *** CD-ROM | disk | FTP | other *** search
- About Cron
-
- Cron is a utility that automatically launches applications or documents at
- times you specify. For example, if you have a mail program that you want
- to set up to check for mail every hour, you can use Cron to launch it for you.
-
- How to use Cron
-
- • Place the "crond" application wherever you normally keep applications.
- I use a "Utilities" folder, the same place I keep Disk First Aid and stuff.
- • Place the CronMgr control panel in your Control Panels folder. You can
- do this by dragging CronMgr on to the System Folder and the Finder will
- put it in the Control Panels Folder for you. (Actually, CronMgr can be
- anywhere, but the Control Panels folder is a handy place for it.)
- • Open up the CronMgr control panel. Make sure that the "Currently
- Running" and "Launch at Startup" boxes are checked.
- • Make Aliases of documents or applications you want to have executed
- periodically. For me, it's usually documents that direct their respective
- applications to do some predetermined function (like a script).
- • Put the aliases inside the "Cron Preferences" folder. This folder is inside
- the "Preferences" folder inside the System Folder.
- • Rename the aliases to specify when you want them executed. The name of
- the alias is identical in syntax to the UNIX crontab time specifier. If you
- don't know the syntax, see the section below.
-
- That's it -- if cron is already running, it will immediately start launching
- things at their respective times.
-
- Cron Alias Names
-
- The syntax for Cron Alias names is somewhat cryptic -- it is identical to
- the UNIX crontab syntax for specifying times. The General format is:
-
- Minute Hour Date Month Dayofweek, where:
-
- Minute is 0-59, (the minute of the hour)
- Hour is 0-23, (the hour of the day)
- Date is 0-31 (the day of the month)
- Month is 1-12 (the month)
- Dayofweek is 0-6 (Sunday-Saturday)
-
- Each field can specify a single value. That is, if you want something to be
- executed on the hour, your minute field would be 0.
-
- Each field can be specify multiple values by placing the desired numbers
- separated by commas (no spaces!). That is, if you want something to be
- launched on both the hour and the half-hour, your minute field would be
- 0,30.
-
- Each field can specify a range of values by placing the desired numbers
- (inclusive) separated by a dash (no spaces!). That is, if you want something
- to be launched during the hours of 8 AM and 5 PM, your hour field would be
- 8-17.
-
- Each field can be a combination of single values and value ranges. That is, if
- you want something to be executed on the hour, on the half hour, and every
- minute from 45 to 50 minutes after the hour, your minute field would be
- 0,30,45-50.
-
- Each field can also specify any value by placing an asterisk (*) in the field.
- If you don't care what day of the month it is, your month field would be *.
-
- There is a special case of Cron Alias Names. If you name an alias "Now" and
- place it in the "Cron Preferences" folder, Cron will launch that alias on the
- next minute, and then delete the alias on the next minute.
-
- Examples of Cron Alias Names
-
- 0 * * * * would launch every hour on the hour.
- 30 * * * * would launch every hour on the half-hour.
- 5,35 * * * * would launch at 5 minutes and 35 minutes after every hour.
- 0 8-17 * * * would launch at 8:00 AM, and every hour on the hour until
- (and including) 5:00 PM.
- 0 8-17 * * 1-5 would launch every hour from 8 to 5, but only on
- Mondays through Fridays.
- 0 0 1 * * would launch at midnight on the first day of every month.
- 5,35 8-17 * 12 2,4 would launch at 5 minutes and 35 minutes after
- every hour from 8 AM to 5 PM, every Tuesday and Thursday in December.
-
- Cron puts a file in the "Cron Preferences" folder that is named "Min Hour
- Date Month Day" so that you can remember the sequence without having
- to look it up all the time.
-
- General Stuff
-
- Crond is a faceless background application. CronMgr is a Control Panel.
- They were both developed using THINK C version 5. They require System
- 7 or greater.